Ubuntu 14.04
Sponsored Link

Zabbix : Install
2016/01/13
 
Install Zabbix which is an enterprise open source monitoring system.
It's possible to monitor not only Linux but Windows, Solaris, IBM AIX and others.
[1]
[2]
[3]
[4] Install some other required packages and Zabbix repository.
root@dlp:~#
apt-get -y install php5-mysql php5-gd php-xml-util php-net-socket php-gettext

root@dlp:~#
wget http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.4-1+trusty_all.deb

root@dlp:~#
dpkg -i zabbix-release_2.4-1+trusty_all.deb

root@dlp:~#
apt-get -y update
[5] Install Zabbix server.
Install Zabbix Agent to monitor Zabbix server itself, too.
root@dlp:~#
apt-get -y install zabbix-get zabbix-server-mysql zabbix-frontend-php zabbix-agent
# select "No"

 +--------------------+ Configuring zabbix-server-mysql +--------------------+
 |                                                                           |
 | The zabbix-server-mysql package must have a database installed and        |
 | configured before it can be used.  This can be optionally handled with    |
 | dbconfig-common.                                                          |
 |                                                                           |
 | If you are an advanced database administrator and know that you want to   |
 | perform this configuration manually, or if your database has already      |
 | been installed and configured, you should refuse this option.  Details    |
 | on what needs to be done should most likely be provided in                |
 | /usr/share/doc/zabbix-server-mysql.                                       |
 |                                                                           |
 | Otherwise, you should probably choose this option.                        |
 |                                                                           |
 | Configure database for zabbix-server-mysql with dbconfig-common?          |
 |                                                                           |
 |                    <Yes>                       <No>                       |
 |                                                                           |
 +---------------------------------------------------------------------------+
[6] Create a database for Zabbix.
root@dlp:~#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 50
Server version: 5.5.46-MariaDB-1ubuntu0.14.04.2 (Ubuntu)

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
create database zabbix;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on zabbix.* to zabbix@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on zabbix.* to zabbix@'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
root@dlp:~#
cd /usr/share/zabbix-server-mysql

root@dlp:/usr/share/zabbix-server-mysql#
mysql -u root -p zabbix < schema.sql

Enter password:
root@dlp:/usr/share/zabbix-server-mysql#
mysql -u root -p zabbix < images.sql

Enter password:
root@dlp:/usr/share/zabbix-server-mysql#
mysql -u root -p zabbix < data.sql

Enter password:
[7] Configure and start Zabbix server.
root@dlp:~#
vi /etc/zabbix/zabbix_server.conf
# line 84: add DB name

DBName=
zabbix
# line 90: add DB user

DBUser=
zabbix
# line 100: add DB user's password

DBPassword=
password
root@dlp:~#
/etc/init.d/zabbix-server start

* Starting Zabbix server zabbix_server
...done.
[8] Configure and start Zabbix Agent to monitor Zabbix server itself.
root@dlp:~#
vi /etc/zabbix/zabbix_agentd.conf
# line 137: change to own hosname

Hostname=
dlp.srv.world
root@dlp:~#
/etc/init.d/zabbix-agent start

* Starting Zabbix agent zabbix_agentd
...done.
[9] Change httpd settings like follows.
root@dlp:~#
vi /etc/zabbix/apache.conf
# line 10: change access permission for Web frontend site

Allow from
127.0.0.1 10.0.0.10/24
# line 18: uncomment and change to your own timezone

php_value date.timezone
Asia/Tokyo
root@dlp:~#
/etc/init.d/apache2 restart

* Restarting web server apache2
...done.
 
Tweet